package org.hq.sql;

import org.hq.sql.entity.HostWeb;
import org.hq.utils.HttpUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class SqlManageServiceTest {
    @Autowired
    private SqlManageService sqlm;
    @Autowired
    private HttpUtils http;
    @Test
    void addWebName() {
        boolean b = sqlm.addWebName("四虎");
        System.out.println(b);
    }

    @Test
    void addHostWeb() {
        String uir="https://www.93ac84.com";
        String uirs=  http.getUir(uir);
        HostWeb hostWeb = new HostWeb();
        hostWeb.setPath(uirs);
        hostWeb.setM3u8("https://m3u8.93cdn.com");
        boolean b = sqlm.addHostWeb("四虎", hostWeb);
        System.out.println(b);
    }
}